package com.mccken.demo.classload;

import cn.hutool.core.io.watch.WatchUtil;
import lombok.SneakyThrows;

public class ClassReloader {  
    public ClassReloader(String classPath) throws Exception {  
        WatchUtil.createAll(classPath,new McckenFileSimpleWatcher()).start(); 
    }  
  
    @SneakyThrows
    public void start() {
        ClassReloader classReloader = new ClassReloader("/Users/mccken/Downloads/temp");
          
    }

    @SneakyThrows
    public static void main(String[] args) {
        ClassReloader classReloader = new ClassReloader("/Users/mccken/Downloads/temp");
//        classReloader.start();
        System.out.println(1);
    }
}